<?php
class Admin_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
	
	function get_list_user()
	{
		$this->db->select('*');
		$this->db->from('"user"');
		$this->db->where('role', 1);
		$result = $this->db->get();
		return $result->result_array();
	}
	
	function update_status_user($status, $id_user)
	{
		$data = array(
			'status' => $status
		);
		$this->db->where('id_user', $id_user);
		$this->db->update('"user"', $data);
	}
	
	function get_email($id_user)
	{
		$this->db->select('*');
		$this->db->from('"user"');
		$this->db->where('id_user', $id_user);
		$result = $this->db->get();
		return $result->result_array();
	}
	
}
?>